// ==UserScript==
// @name         Unity文档优化
// @namespace    http://tampermonkey.net/
// @version      2025-07-04
// @description  try to take over the world!
// @author       You
// @match        file:///*/ScriptReference/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=bing.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    let cookie=false;   // 是否关闭了cookie 弹出页面
    let footer=false;   // 是否关闭了footer 弹出页面
    let wmyqq_timer = setInterval(()=>{
        let dom_sdk = document.getElementById("onetrust-consent-sdk");
        let dom_footer = document.getElementsByClassName("footer-wrapper")[0];
        if(dom_sdk){
            dom_sdk.remove();
            cookie=true;
        }
        if(dom_footer){
            dom_footer.remove();
            footer=true;
        }
        if(cookie && footer){
            clearInterval(wmyqq_timer);
        }
    },100)
})();